package pl.engine.model.vo.obstacle
{
	import pl.error.InternalError;

	import starling.display.DisplayObject;

	/**
	 * ...
	 * @author Bakudo
	 */
	public class BaseObstacle implements IBaseObstacle
	{
		protected var _x:uint;
		protected var _y:uint;
		protected var _oX:uint;
		protected var _oY:uint;
		protected var _isoX:int;
		protected var _isoY:int;
		private var _type:uint;
		private var _isRendered:Boolean;
		protected var _pivotX:uint;
		protected var _pivotY:uint;
		protected var _texture:uint;
		protected var _display:DisplayObject;
		private var _id:uint;
		private static var secureFunction:Function;

		public function BaseObstacle( _px:uint, _py:uint, _type:uint, _texture:uint )
		{
			this._texture = _texture;
			x = _px;
			y = _py;

			this._type = _type;
			toOverride();
		}

		protected function toOverride():void
		{
			throw new Error( InternalError.OVERRIDE_ERROR );
		}

		public function get x():uint
		{
			return _x;
		}

		public function set x( val:uint ):void
		{
			_x = val;
		}

		public function get y():uint
		{
			return _y;
		}

		public function set y( val:uint ):void
		{
			_y = val;
		}

		public function get type():uint
		{
			return _type;
		}

		public function set type( val:uint ):void
		{
			_type = val;
		}

		public function get display():DisplayObject
		{
			throw new Error( InternalError.OVERRIDE_ERROR );
			return _display;
		}

		public function set isRendered( val:Boolean ):void
		{
			_isRendered = val;
		}

		public function get isRendered():Boolean
		{
			return _isRendered;
		}

		public function get oX():uint
		{
			throw new Error( InternalError.OVERRIDE_ERROR );
			return 0;
		}

		public function get oY():uint
		{
			throw new Error( InternalError.OVERRIDE_ERROR );
			return 0;
		}

		public function get isoX():int
		{
			throw new Error( InternalError.OVERRIDE_ERROR );
			return 0;
		}

		public function get isoY():int
		{
			throw new Error( InternalError.OVERRIDE_ERROR );
			return 0;
		}

		public function get pivotX():uint
		{
			return _pivotX;
		}

		public function get pivotY():uint
		{
			return _pivotY;
		}

		public function get id():uint
		{
			return _id;
		}

		public function set id( val:uint ):void
		{
			_id = val;
		}

		public function cleanView():void
		{
			throw new Error(InternalError.OVERRIDE_ERROR);
		}
	}
}